package com.ahp.service;

import java.util.List;
import java.util.Map;
import java.util.Set;

import javax.servlet.http.HttpServletRequest;

import com.ahp.bean.Factor;
import com.ahp.bean.Module;
import com.ahp.bean.User;
import com.ahp.util.PageList;
import com.ahp.util.Pages;


public interface ModuleService {
	/**
	 * @param user
	 * @return
	 * @date:Sep 7, 2009
	 * @author: 李晓娜
	 */
	public List<Module> searchDefaultAndMineModule(User user);
	
	/**
	 * @param req
	 * @return
	 */
	public PageList searchUserModule(User user,Pages pages);
	
	/**
	 * @param list
	 * @return
	 * @date:Sep 8, 2009
	 * @author: 李晓娜
	 */
	public Map<String,Map<Integer,Set<Factor>>>	parseModule(List<Module> list);
	
	/**
	 * @param moduleId
	 * @return
	 * @date:Sep 8, 2009
	 * @author: 李晓娜
	 */
	public Map<Integer,Set<Factor>> parseModule(Integer moduleId);
	
	/**
	 * @param moduleId
	 * @return
	 * @date:Sep 8, 2009
	 * @author: 李晓娜
	 */
	public List<Factor> parseModuleGetOneLevel(Integer moduleId, Integer level);
	
	public List<String[]> parseLevelOne(Map<String,String[]> map);
	
	public Map<String,Float> parseLevelTwo(Map<String,String[]> map, List<String[]> levOneList);
	
	public Map<String,Set<String[]>> parseLevelTwo(Map<String,String[]> map);
	
	public Map<Integer,List<Factor>> parseOneTwoLevelFactor(List<Factor> levelOne, List<Factor> levelTwo);
	
	public Map<String,Float> ahp(Map<String,Set<String[]>> map1,Map<String,Float> map2);
	
	public boolean addModule(Module mod);
}
